package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Getter
@Setter
@Entity
@Table(name = "camera")
public class CameraData extends LogicEntity {
    @Column(nullable = false)
    private String picUrl; // 图片地址

    @Column(columnDefinition = "LONGTEXT") // 使用 TEXT 类型存储 Base64 数据
    private String picBase64; // Base64 编码的图片数据

    @ManyToOne
    @JoinColumn(name = "device_id", nullable = false)
    private Device device; // 所属设备
}
